﻿#pragma once

#include <QWidget>
#include "ui_RegExpViewer.h"

class QsciScintilla;
class ScintillaEditor;
class RegExpViewtClass : public QWidget
{
	Q_OBJECT

public:
	RegExpViewtClass(QWidget *parent, QsciScintilla* pEdit);
	~RegExpViewtClass();

private slots:
	void on_upper();

private:
	Ui::QtRegExpViewerClass ui;
	QsciScintilla* m_pEdit;
	ScintillaEditor* scintillaEditor_;
	std::function<QsciScintilla* ()> scintillaCallback_;
	QWidget* mainWidget_;
	int lastTotalLength = 0;

private:
	QString unicode2utf8(QString unicode);

public:
	void setScintilla(const std::function<QsciScintilla* ()>& cb);

};
